package com.aios.service;

import java.util.List;

import com.aios.entity.Door;
import com.aios.entity.mapper.AssignedState;
import com.aios.entity.mapper.DoorHasUsers;

public interface DoorService extends GenericService<Door, Integer>,	PaginatedService {

	ExistValidationEnum validateDoorName(String doorName);

	List<AssignedState> findAssignedGroupsByDoorId(Integer doorId);

	List<AssignedState> findAssignedUsersByDoorId(Integer doorId);

	List<AssignedState> findAvailableGroupsByDoorId(Integer doorId);

	List<AssignedState> findAvailableUsersByDoorId(Integer doorId);

	List<DoorHasUsers> findUsersForDoors();

	int updateUserList(Door door, List<Integer> selectedUserList,
			Integer systemUserId);

	int updateGroupList(Door door, List<Integer> selectedGroupList,
			Integer systemUserId);

	int saveUserList(Door door, List<Integer> selectedUserList,
			Integer systemUserId);

	int saveGroupList(Door door, List<Integer> selectedGroupList,
			Integer systemUserId);

	int findIdByDoorName(String doorName);

	DoorHasUsers findByIdWithUserGroup(Integer doorId);
	
	int getCount();

	ExistValidationEnum validateDoorName(String doorName, Integer id);

}
